<template>
  <div class="main">
    <div class="header">
      <img src="@/assets/tabs/fhjt.svg" alt="" />
      <p class="title">我的订单</p>
      <img class="fdj" src="@/assets/tabs/fdj2.svg" alt="" />
    </div>
    <!-- 顶部导航 -->
    <div class="top-nav">
      <van-tabs class="tabs" v-model:active="navActive">
        <van-tab name="1" title="全部"></van-tab>
        <van-tab name="2" title="待付款"></van-tab>
        <van-tab name="3" title="待收货"></van-tab>
        <van-tab name="3" title="已完成"></van-tab>
        <van-tab name="3" title="已取消"></van-tab>
      </van-tabs>
    </div>
    <div class="order">
      <div class="order1">
        <p>订单号:000001</p>
        <p class="wait">待付款</p>
      </div>
      <div class="order_goods">
        <div class="order_goods1">
          <img class="goods" src="@/assets/tabs/p7.png" alt="" />
        </div>
        <div class="order_goods2">
          <div class="order_goods3">
            <span class="goods_title">标题</span>
            <span class="goods_price">价格</span>
          </div>
          <div class="order_goods4">
            <span class="goods_xinghao">型号</span>
            <span class="goods_num">x1</span>
          </div>
        </div>
      </div>
      <div class="count">
        <span class="time">2022-12-12 12:12</span>
        <span class="count1">金额:￥2000.00</span>
      </div>
      <div class="btn">
        <van-button class="btn1" color="#ff6a00" plain round
          >取消订单</van-button
        >
        <van-button class="btn1" color="#ff6a00" plain round
          >立即付款</van-button
        >
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const navActive = ref('1')
</script>

<style lang="scss" scoped>
.main {
  background-color: #f2f2f2;
}
.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 15px 20px 5px 20px;
  background-color: #ff6a00;
}

.header img {
  width: 10px;
}
.header .fdj {
  width: 20px;
}
.header .title {
  color: #eee;
  font-size: 1.2em;
}
.order1 {
  background-color: #fff;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 5px 10px;
  margin-top: 10px;
  border-bottom: 1px dashed #f2f2f2;
}
.order1 p {
  font-size: 15px;
}
.order1 .wait {
  color: #ff2121;
}
.goods {
  width: 80px;
  border-bottom: 1px dashed #f2f2f2;
}
.order_goods {
  padding-top: 10px;
  display: flex;
  flex-direction: row;
  background-color: #fff;
}
.order_goods2 {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: calc(100vw - 90px);
  padding-top: 10px;
  padding-bottom: 10px;
}
.order_goods3 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.order_goods4 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.goods_title {
  font-size: 15px;
}
.goods_xinghao {
  font-size: 10px;
  color: #ccc;
}
.goods_price {
  font-size: 10px;
  color: #ccc;
}
.goods_num {
  font-size: 10px;
  color: #ccc;
}
.count {
  border-bottom: 1px dashed #f2f2f2;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background-color: #fff;
  padding-top: 10px;
}
.time {
  font-size: 15px;
  color: #ccc;
  padding-left: 10px;
}
.count {
  font-size: 15px;
  padding-right: 10px;
}
.btn {
  background-color: #fff;
  display: flex;
  justify-content: flex-end;
}
.btn1 {
  margin-top: 10px;
  height: 25px;
  margin-right: 10px;
}
</style>
<style>
:root {
  --van-tab-active-text-color: #ff6a00;
  --van-tabs-default-color: #ff6a00;
  --van-tabs-bottom-bar-color: #ff6a00;
}
</style>
